]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
endSessionDialog: Do not run gnome-software in 'gdm' mode
authorMilan Crha <mcrha@redhat.com>
Wed, 2 Sep 2026 09:13:05 +0000 (11:13 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 13 Sep 2026 17:39:10 +0000 (19:39 +0200)
The gnome-software runs for a logged-in user, in the D-Bus session bus.
Running it for the 'gdm' user can be wrong both for user privileges,
and because the 'gdm' user does not have a home directory, thus
the gnome-software needs to cache everything from scratch, which
takes time and resources, delaying the open of the Reboot/Power Off
confirmation dialog.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9040

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4376>
(cherry picked from commit 6356944ea47ef8dbdf49a89561ef1b463dc5c3e3)

js/ui/endSessionDialog.js

index ee26bffb1d1c2f2af765a8883edc65cb32abed03..eebb0edfcadf309a8e32d60eef28d61fe46f6c86 100644 (file)
@@ -29,6 +29,7 @@ import * as CheckBox from './checkBox.js';
 import * as Dialog from './dialog.js';
 import * as GnomeSession from '../misc/gnomeSession.js';
 import * as LoginManager from '../misc/loginManager.js';
+import * as Main from './main.js';
 import * as ModalDialog from './modalDialog.js';
 import * as UserWidget from './userWidget.js';
 
@@ -290,6 +291,9 @@ class EndSessionDialog extends ModalDialog.ModalDialog {
         if (this._softwareOfflineUpdatesProxy !== null)
             return;
 
+        if (Main.sessionMode.isGreeter)
+            return;
+
         try {
             this._softwareOfflineUpdatesProxy = await SoftwareOfflineUpdatesProxy.newAsync(
                 Gio.DBus.session, 'org.gnome.Software', '/org/gnome/Software/OfflineUpdates');